package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the TALLY_TABLE database table.
 * 
 */
@Entity
@Table(name="TALLY_TABLE")
@NamedQuery(name="TallyTable.findAll", query="SELECT t FROM TallyTable t")
public class TallyTable implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String tallyid;

	private String admin4;

	private BigDecimal balance;

	private BigDecimal depositlimit4;

	private BigDecimal lacklimit;

	private String livetype;

	private String patientname5;

	private String paystatus2;

	private String tallystatus;

	@Temporal(TemporalType.DATE)
	private Date tallytime;

	private BigDecimal tallytotal;

	//bi-directional many-to-one association to TallydetailsTable
	@OneToMany(mappedBy="tallyTable")
	private List<TallydetailsTable> tallydetailsTables;

	//bi-directional many-to-one association to LiveinrecordTable
	@ManyToOne
	@JoinColumn(name="LIVEID8")
	private LiveinrecordTable liveinrecordTable;

	//bi-directional many-to-one association to PayTable
	@ManyToOne
	@JoinColumn(name="PAYID")
	private PayTable payTable;

	public TallyTable() {
	}

	public String getTallyid() {
		return this.tallyid;
	}

	public void setTallyid(String tallyid) {
		this.tallyid = tallyid;
	}

	public String getAdmin4() {
		return this.admin4;
	}

	public void setAdmin4(String admin4) {
		this.admin4 = admin4;
	}

	public BigDecimal getBalance() {
		return this.balance;
	}

	public void setBalance(BigDecimal balance) {
		this.balance = balance;
	}

	public BigDecimal getDepositlimit4() {
		return this.depositlimit4;
	}

	public void setDepositlimit4(BigDecimal depositlimit4) {
		this.depositlimit4 = depositlimit4;
	}

	public BigDecimal getLacklimit() {
		return this.lacklimit;
	}

	public void setLacklimit(BigDecimal lacklimit) {
		this.lacklimit = lacklimit;
	}

	public String getLivetype() {
		return this.livetype;
	}

	public void setLivetype(String livetype) {
		this.livetype = livetype;
	}

	public String getPatientname5() {
		return this.patientname5;
	}

	public void setPatientname5(String patientname5) {
		this.patientname5 = patientname5;
	}

	public String getPaystatus2() {
		return this.paystatus2;
	}

	public void setPaystatus2(String paystatus2) {
		this.paystatus2 = paystatus2;
	}

	public String getTallystatus() {
		return this.tallystatus;
	}

	public void setTallystatus(String tallystatus) {
		this.tallystatus = tallystatus;
	}

	public Date getTallytime() {
		return this.tallytime;
	}

	public void setTallytime(Date tallytime) {
		this.tallytime = tallytime;
	}

	public BigDecimal getTallytotal() {
		return this.tallytotal;
	}

	public void setTallytotal(BigDecimal tallytotal) {
		this.tallytotal = tallytotal;
	}

	public List<TallydetailsTable> getTallydetailsTables() {
		return this.tallydetailsTables;
	}

	public void setTallydetailsTables(List<TallydetailsTable> tallydetailsTables) {
		this.tallydetailsTables = tallydetailsTables;
	}

	public TallydetailsTable addTallydetailsTable(TallydetailsTable tallydetailsTable) {
		getTallydetailsTables().add(tallydetailsTable);
		tallydetailsTable.setTallyTable(this);

		return tallydetailsTable;
	}

	public TallydetailsTable removeTallydetailsTable(TallydetailsTable tallydetailsTable) {
		getTallydetailsTables().remove(tallydetailsTable);
		tallydetailsTable.setTallyTable(null);

		return tallydetailsTable;
	}

	public LiveinrecordTable getLiveinrecordTable() {
		return this.liveinrecordTable;
	}

	public void setLiveinrecordTable(LiveinrecordTable liveinrecordTable) {
		this.liveinrecordTable = liveinrecordTable;
	}

	public PayTable getPayTable() {
		return this.payTable;
	}

	public void setPayTable(PayTable payTable) {
		this.payTable = payTable;
	}

}